<?php

class Users_Form_UserTypeAdd extends Zend_Form {

    public function init() {

        $this->setAction('/admin/usertype/add')
                ->setMethod('post');

        //text box for user type name
        $userType = new Zend_Form_Element_Text('usertype');
        $userType->setLabel('User Type: ')
                ->setOptions(array('size' => '30'))
                ->setRequired(true)
                ->addValidator('Alnum')
                ->addFilter('htmlEntities')
                ->addFilter('stringTrim');

        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setLabel('Add New User Type')
                ->setOptions(array('class' => 'submit'))
                ->setAttrib('class', 'btn btn-success');

        //attach to form
        $this->addElement($userType)
                ->addElement($submit);
    }

}

